package design;

import java.util.List;

import demo.wrapper.FatRma;

/**
 * Created by zhangyanfei on 2019/7/8.
 *
 * @author zhangyanfei
 * @date 2019/07/08
 */
public abstract class AbstractWrapper {

    abstract Scope getScope();

    abstract List<FatRma> doWrapper(List<FatRma> fatRmas);

    public List<FatRma> wrapper(List<FatRma> fatRmas, Scope resultScope) {
        if (getScope().isExtended(resultScope)) {
            fatRmas = doWrapper(fatRmas);
        }

        return fatRmas;
    }
}
